<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>绝对定位-相对浏览器定位</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }

    body {
      height: 2000px;
    }

    .father {
      position: relative;
      width: 300px;
      height: 300px;
      background-color: pink;
    }

    .son {
      position: absolute;
      right: 50px;
      bottom: 50px;
      width: 100px;
      height: 100px;
      background-color: skyblue;
    }
  </style>
</head>

<body>
  <div class="father">
    <div class="son"></div>
  </div>
</body>

</html>